package com.ksd.modules.advert.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ksd.common.po.BatchIdsPO;
import com.ksd.commons.IBaseService;
import com.ksd.modules.advert.entity.AdminAdvert;
import com.ksd.modules.advert.po.AdminAdvertSavePO;
import com.ksd.modules.advert.po.AdminAdvertSearchPO;
import com.ksd.modules.advert.vo.AdvertisementVo;

import java.util.List;

/**
 * <p>
 * 广告 服务类
 * </p>
 *
 * @author Auto Generator
 * @since 2023-08-16
 */
public interface IAdminAdvertService extends IBaseService<AdminAdvert> {

    /**
     * 查询广告接口搜索并分页
     * @return
     */
    Page<AdminAdvert> findAdvert(AdminAdvertSearchPO adminAdvertSearchPO);


    /**
     * 保存广告
     */
    boolean saveUpdateAdvert(AdminAdvertSavePO adminAdvertSavePO);

    /**
     * 删除广告
     * @param id
     * @return
     */
    boolean deleteAdvertById(Long id);


    /**
     * 根据id获取广告信息
     * @param id
     * @return
     */
    AdminAdvert getAdvertById(Long id);

    /**
     * 查询首页广告
     * @param functionType
     * @return
     */
    List<AdvertisementVo> getHomeAdvert(Integer functionType);

    /**
     * 查询栏目广告
     * @param categoryId
     * @param functionType
     * @return
     */
    List<AdvertisementVo>getAdvert(Long categoryId , Integer functionType);

    /**
     *
     * @param id
     * @param sorted
     * @return
     */
    boolean changeCategoryAdvertSort(Long id,Integer sorted);


    /**
     * 批量删除-物理删除
     *
     * @param batchIdsPO
     * @return
     */

     Boolean batchRemoves(BatchIdsPO batchIdsPO);

    /**
     * 批量逻辑恢复
     *
     * @param batchIdsPO
     * @return
     */
     Boolean batchRecovers(BatchIdsPO batchIdsPO);

    /**
     * 批量删除-逻辑删除
     *
     * @param batchIdsPO
     * @return
     */
     Boolean bacthDels(BatchIdsPO batchIdsPO);


    /**
     * 物理删除
     *
     * @param id
     * @return
     */
     boolean removeAdvertById(Long id);

    /**
     * 恢复删除
     *
     * @param id
     * @return
     */
     boolean recoverAdvertById(Long id);
}
